package com.ruoyi.produce.process.defective.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.sql.Timestamp;

/**
 * @author Drj 2021/12/20
 * 记录产品次品率
 * produce_defective
 */
public class Defective extends BaseEntity {
    /**
     * 班次编号
     */
    @Excel(name = "班次编号")
    private String shiftInfoId;
    /**
     * 早/晚班
     */
    @Excel(name = "班次名称")
    private String shiftInfoName;
    /**
     * 加工单编号
     */
    @Excel(name = "加工单编号")
    private String workSheetId;
    /**
     * 产品名称
     */
    @Excel(name = "产品名称")
    private String produceName;
    /**
     * 不良品数量
     */
    @Excel(name = "不良品数量")
    private Double defectiveNum;
    /**
     * 总数量
     */
    @Excel(name = "总数量")
    private Double total;
    /**
     * 员工编号
     */
    @Excel(name = "员工编号")
    private String staffId;
    /**
     * 员工名称
     */
    @Excel(name = "员工名称")
    private String staffName;
    /**
     * 车间名称
     */
    private String workshop;
    /**
     * 创建时间
     */
    @Excel(name = "时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp createTime;

    public String getShiftInfoId() {
        return shiftInfoId;
    }

    public void setShiftInfoId(String shiftInfoId) {
        this.shiftInfoId = shiftInfoId;
    }

    public String getShiftInfoName() {
        return shiftInfoName;
    }

    public void setShiftInfoName(String shiftInfoName) {
        this.shiftInfoName = shiftInfoName;
    }

    public String getWorkSheetId() {
        return workSheetId;
    }

    public void setWorkSheetId(String workSheetId) {
        this.workSheetId = workSheetId;
    }

    public String getProduceName() {
        return produceName;
    }

    public void setProduceName(String produceName) {
        this.produceName = produceName;
    }

    public Double getDefectiveNum() {
        return defectiveNum;
    }

    public void setDefectiveNum(Double defectiveNum) {
        this.defectiveNum = defectiveNum;
    }

    public Double getTotal() {
        return total;
    }

    public void setTotal(Double total) {
        this.total = total;
    }

    public String getStaffId() {
        return staffId;
    }

    public void setStaffId(String staffId) {
        this.staffId = staffId;
    }

    public String getStaffName() {
        return staffName;
    }

    public void setStaffName(String staffName) {
        this.staffName = staffName;
    }

    public String getWorkshop() {
        return workshop;
    }

//    public void setWorkshop(String workshop) {
//        switch (workshop){
//            case "0":this.workshop = "注塑车间";break;
//            case "1":this.workshop = "包装车间";break;
//        }
//
//    }


    public void setWorkshop(String workshop) {
        this.workshop = workshop;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "Defective{" +
                "shiftInfoId='" + shiftInfoId + '\'' +
                ", shiftInfoName='" + shiftInfoName + '\'' +
                ", workSheetId='" + workSheetId + '\'' +
                ", produceName='" + produceName + '\'' +
                ", defectiveNum=" + defectiveNum +
                ", total=" + total +
                ", staffId='" + staffId + '\'' +
                ", staffName='" + staffName + '\'' +
                ", workshop='" + workshop + '\'' +
                ", createTime=" + createTime +
                '}';
    }
}
